<template>
	<view>
		<u-navbar :title="title" :status-bar="false" safe-area-inset-top :placeholder="true"
			:autoBack="true"></u-navbar>
		<view class="page">
			<text v-html="content">
			</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: null,
				title: null
			}
		},
		onLoad(options) {
			this.getAgreement(options.code);
		},
		methods: {
			//获取协议
			getAgreement(code) {
				this.api.getAgreement(code).then(res => {
					console.log(res);
					this.title = res.data.data.title
					this.content = res.data.data.content;
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	page {
		background-color: #F6F6F6;
	}

	.page {
		margin: 20rpx;
		padding: 10rpx;
	}
</style>